Hugging Face
Quick Start Guide
Note: AI_MODEL should stay default
unless there is a folder in prompts
specific to the model that you're using. You can also create one and add your own prompts.
Update your agent settings
- Set
AI_PROVIDER
tohuggingface
. - Set
HUGGINGFACE_API_KEY
to your Hugging Face API key. - Set
HUGGINGFACE_STABLE_DIFFUSION_MODEL
to the name of the model you want to use. Default isrunwayml/stable-diffusion-v1-5
. - Set
HUGGINGFACE_STABLE_DIFFUSION_API_URL
to the API URL of the model you want to use. Default ishttps://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5
. - Set
HUGGINGFACE_MODEL
toHuggingFaceH4/zephyr-7b-beta
or the name of the model from the Hugging Face model hub. - Set
HUGGINGFACE_STOP_TOKEN
to the token that you want to use to stop the model from generating more text. Default is ` - Set
HUGGINGFACE_TEMPERATURE
to a value between 0 and 1. The higher the value, the more creative the output. - Set
HUGGINGFACE_MAX_TOKENS
to the maximum number of input tokens. - Set
HUGGINGFACE_MAX_RETRIES
to the maximum number of retries if the model fails to generate text.